package top.yxqz.spring.porxy;

import org.springframework.stereotype.Component;

/**
 * @author: 余小小
 * @date: 2023/4/11
 * @description：计算器的实现类
 */
@Component
public class CalculatorImpl implements Calculator {
    @Override
    public int add(int i, int j) {
        System.out.println("这是i+j的实现");
        System.out.println("你的参数是" + i + "和" + j);

        int result = i + j;

        System.out.println("在add的实现中会在这里输出这个值是；" + result);

        return result;
    }

    @Override
    public int sub(int i, int j) {
        System.out.println("这里是i-j的实现");
        int result = i - j;
        return result;
    }

    @Override
    public int mul(int i, int j) {
        System.out.println("这里是i*j的实现");
        int result = i * j;
        return result;
    }

    @Override
    public int div(int i, int j) {
        System.out.println("这里是i/j的实现");
        int result = i / j;
        return result;
    }
}
